﻿//-----------------------------------------------------------------------
// <copyright file="DTOBidder.cs" company="Transilvania University of Brasov">
//     Copyright (c) Nagy Robert. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DomainModel
{
    using System.ComponentModel.DataAnnotations;
    using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

    /// <summary>
    /// Describes a Bidder entity.
    /// </summary>
    public class DTOBidder
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the username.
        /// </summary>
        [NotNullValidator(ErrorMessage = "Username cannot be null.")]
        [StringLengthValidator(4, 50, ErrorMessage = "Username length must be between 4 and 50 characters long.")]
        public string Username { get; set; }

        /// <summary>
        /// Gets or sets the first name.
        /// </summary>
        [NotNullValidator(ErrorMessage = "First name cannot be null.")]
        [StringLengthValidator(2, 50, ErrorMessage = "First name length must be between 2 and 50 characters long.")]
        public string FirstName { get; set; }

        /// <summary>
        /// Gets or sets the last name.
        /// </summary>
        [NotNullValidator(ErrorMessage = "Last name cannot be null.")]
        [StringLengthValidator(2, 50, ErrorMessage = "Last name length must be between and 50 characters long.")]
        public string LastName { get; set; }

        /// <summary>
        /// Gets or sets the password.
        /// </summary>
        [NotNullValidator(ErrorMessage = "Password cannot be null.")]
        [StringLengthValidator(6, 50, ErrorMessage = "Password length must be between 6 and 50 characters long.")]
        public string Password { get; set; }
    }
}
